home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_12_1986_Transactor_Publishing.d64
/
kernal who.src4
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
53 lines
; program 4
; fetches disk status and displays on top line of screen
; when the control and commodore keys are pressed together.
;
init sei ;interrupts off
lda #h,start ;high order byte of start
sta $0315 ;change high order vector
lda #l,start ;low byte of start
sta $0314 ;low byte of vector
cli ;interrupts on
lda #$06 ;match value
sta $fe ;save it
rts ;return
;
start lda $028d ;load keyboard shift pattern
cmp $fe ;6= control+commodore key
beq begin ;if pressed then do it
lda #$06 ;countdown limit
cmp $fe ;reached yet?
beq exit ;if yes then continue
dec $fe ;countdown one more jiffy
exit jmp $ea31 ;finish interrupt
begin lda #$2d ;45 jiffys (.75 second)
sta $fe ;countdown location
lda #$08 ;device number
jsr $ffb4 ;talk: command disk to talk
lda #$6f ;secondary address 15
jsr $ff96 ;tksa: send second
bcs exit ;error abort
sec ;set carry bit
jsr $fff0 ;plot: fetch cursor location
stx $fb ;save it
sty $fc ;save it too
lda #$13 ;home cursor character
jsr $ffd2 ;chrout: print it
lda #$00 ;a zero
sta $90 ;clear the status word
next jsr $ffa5 ;acptr: get error channel character
jsr $ffd2 ;chrout: print it
jsr $ffb7 ;readst: read status byte
cmp #$00 ;if zero
beq next ;get another character
ldx $fb ;cursor x position
lda $fc ;cursor y
cmp #$28 ;short line?
bcc goplot ;if yes go plot
sbc #$28 ;subtract 40
goplot tay ;move to y register
clc ;clear carry
jsr $fff0 ;plot: set cursor back
jsr $ffab ;untlk: untalk serial devices
jmp exit ;finish